package com.specialized.pay.service.impl;

import com.alipay.api.AlipayApiException;
import com.specialized.pay.service.PayService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author：wangxinyu
 * @Package：com.specialized.pay.service
 * @Project：Specialized-Cloud
 * @name：WxPayServiceImpl
 * @Date：2024/7/26 17:08
 */
@Service("wx")
public class WxPayServiceImpl implements PayService {
    @Override
    public String alipayTradePagePay(String orderCard) throws AlipayApiException {
        return "微信支付";
    }

    @Override
    public void closeAlipayTradePagePay(String tradeNo) throws AlipayApiException {
        System.out.println("微信关闭");
    }

    @Override
    public void alipayTradeRefund(String tradeNo) throws AlipayApiException {
        System.out.println("微信退款");
    }

    @Override
    public String alipayTradeQuery(String TradeNo) throws AlipayApiException {
        return "查询微信交易";
    }

    @Override
    public String alipayTradeFastpayRefundQuery(String tradeNo) throws AlipayApiException {
        System.out.println("微信退款查询");
        return "查询微信退款状态";
    }

    @Override
    public String notifyUrl(HttpServletRequest request) throws AlipayApiException {
        return "异步回调";
    }
}
